#include "myEeprom.h"
#include <Arduino.h>
#include <EEPROM.h>


int MyEeprom::writeBlock(int firstAddress, const byte* dataPointer, int byteLenght)
{
  const byte* p = (const byte*)dataPointer;
  unsigned int i;
  for (i = 0; i < byteLenght; i++)
    EEPROM.write(firstAddress++, *p++);
  return i;
}

int MyEeprom::readBlock(int firstAddress, byte* dataPointer, int byteLength)
{
  byte* p = (byte*)dataPointer;
  unsigned int i;
  for (i = 0; i < byteLength; i++)
    *p++ = EEPROM.read(firstAddress++);
  return i;
}


